#ifndef EVM_H
#define EVM_H

#include <stdint.h>

#include "evm_error.h"
#include "evm_stack.h"
#include "evm_memory.h"
#include "evm_process.h"

enum _arg_type {
    ARG_BOOLEAN,
    ARG_CHAR,
    ARG_INTEGER,
    ARG_FLOAT,
    ARG_STRING
};


typedef struct evm_process_list {
    struct evm_process      *proc;
    struct evm_process_list *next;
} evm_process_list;

typedef struct evm {
    evm_process_list   *processes;
    struct evm_process *current;

    void               *cmd_handlers[128];
} evm;


evm*     evm_new      ( void );
uint32_t evm_load     ( evm *vm, const char *file_name );
uint32_t evm_load_mem ( evm *vm, const uint8_t *data, uint32_t size );
uint32_t evm_run      ( evm *vm );

uint32_t evm_add_process( evm *vm, struct evm_process *proc );

#endif // EVM_H
